Skip to content

docs: fold the workflows directory into the documentation - #129

Merged
carluri merged 2 commits into
mainfrom
docs/fold-workflows-into-docs
Nov 14, 2026
Merged

carluri merged 2 commits into
mainfrom
docs/fold-workflows-into-docs

Conversation

@carluri

@carluri carluri commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

The repository root had a separate workflows/ directory holding one notebook and a README. Nothing in the repository referenced it, and its content is documentation — a task-oriented notebook that complements the qSPECT tutorial already published under docs/.

What changed

  • Moved workflows/qSPECT/counts_to_bqml.ipynb → docs/source/tutorials/qSPECT/counts_to_bqml.ipynb, and added it to the tutorials toctree directly after qSPECT/qSPECT_Tutorial, which it builds on.
  • Rewrote the notebook's introduction for a docs reader: titled "Convert reconstructed SPECT counts to Bq/mL (batch)", named as the batch counterpart to the qSPECT tutorial with a link to that page, and carrying over the conventions that lived in workflows/README.md — configure before running, keep patient data/credentials/outputs out of the repository, never commit executed cells containing patient information, and move reusable logic into the pytheranostics package.
  • Noted the distinction in the tutorials index between guided lessons and notebooks meant to be downloaded and run against your own data, so the remainder of the README's purpose survives the move.
  • Deleted workflows/.

The two notebooks are complementary rather than duplicative: the tutorial converts a single image and explains what the conversion does to the pixels and header; this one does recursive discovery across a directory, validates the shared configuration, converts every time point, and adds a field-of-view total-activity sanity check against the decayed injected activity.

Verification

Clean Sphinx build in an isolated venv with the docs extras:

  • docs/build/html/tutorials/qSPECT/counts_to_bqml.html renders, title included
  • the relative qSPECT_Tutorial.ipynb cross-link resolves to qSPECT_Tutorial.html
  • the page appears in the tutorials index
  • git grep confirms nothing else referenced workflows/
  • pre-commit passes, including the no-medical-images guard

Two build warnings remain, both predating this change and unrelated to it: autodoc cannot import dosiomicsclass (it needs pyradiomics, which is not a declared dependency), and a JSON lexing warning in ROI_Mapping_Tutorial.ipynb.

The repository root had a separate `workflows/` directory holding a single
notebook and a README. Nothing in the repository referenced it, and its
content is documentation: a task-oriented notebook that complements the
qSPECT tutorial already published under docs/.

- Move `workflows/qSPECT/counts_to_bqml.ipynb` to
  `docs/source/tutorials/qSPECT/counts_to_bqml.ipynb` and add it to the
  tutorials toctree beside the qSPECT tutorial it builds on.
- Rewrite the notebook's introduction for a docs reader: name it as the
  batch counterpart to the qSPECT tutorial, link to that page, and carry
  over the conventions that lived in `workflows/README.md` (configure
  before running, keep patient data and outputs out of the repository,
  move reusable logic into the package).
- Note the guided-lesson vs. run-on-your-own-data distinction in the
  tutorials index, so the rest of the README's purpose survives the move.
- Delete `workflows/`.

Verified with a clean Sphinx build: the page renders, the cross-link to
the qSPECT tutorial resolves, and it appears in the tutorials index. The
two remaining build warnings (the dosiomicsclass autodoc import, which
needs the undeclared pyradiomics dependency, and a JSON lexing warning in
the ROI mapping tutorial) both predate this change.
Two fixes to the documentation configuration.

`source_branch` was still "dev". That branch was deleted when the trunk
was consolidated onto main, so furo's View and Edit buttons pointed at a
branch that no longer exists; the published site served a 404 from every
one of its 17 pages. Point it at main.

Furo has no download button, and nbsphinx adds none by default, so the
notebooks were published but unlinked: nbsphinx copies each .ipynb next
to its rendered HTML, and the file was reachable only by typing its URL.
Add an nbsphinx_prolog giving each notebook page a link to its source on
GitHub and a download link to its own .ipynb. The href is a plain
relative filename pointing at the copy nbsphinx already writes, so no
second copy is created under _downloads.

The batch qSPECT page no longer needs the hardcoded repository URL in its
introduction and now refers to the prolog's link instead.

Verified in a clean build: no /dev/ links remain, View and Edit resolve
against main, all seven notebook pages carry a download link whose target
file exists beside the page, the prolog does not reach non-notebook
pages, and the generated-from links return 200 on GitHub. The two
remaining build warnings predate this branch.
@carluri
carluri merged commit 0329b58 into main Nov 14, 2026
6 checks passed
@carluri
carluri deleted the docs/fold-workflows-into-docs branch November 14, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant